#include "stdio.h"
#include "stdlib.h"

main()
{
   yyparse();
   return 0;
}

yyerror(msg)
   char *msg;
{
   extern long yypos;
   printf("line %d: %s\n", yypos, msg);

//Added By Jeffrey Geyssens
   FILE *result;
   result = fopen("result","w+");
   fprintf(result, "(ERROR): line %d: %s\n", yypos, msg);
   fclose(result);
   exit(1);
}

yywrap()
{
   return 1;
}
